package cn.ywsj.ywsjmidtier.entity.VO;

import cn.ywsj.ywsjmidtier.entity.BaseGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

/**
 * @ClassName : GoodsReceiptAddressVo
 * @Author : Lenovo
 * @Date: 2021/7/20 11:28
 * @Description :
 */
@Data
public class GoodsReceiptAddressVo {
    @NotNull(groups = {BaseGroup.Update.class})
    private Long addressId;

    private String addresId;

    @NotBlank(message = "{com.itonghui.address.consignee.null}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    @Length(max = 10, message = "{com.itonghui.address.consignee.length}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String consignee;

    @NotBlank(message = "{com.itonghui.address.areaid.null}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String areaId;

    @NotBlank(message = "{com.itonghui.address.streetAddress.null}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    @Length(max = 30, message = "{com.itonghui.address.streetAddress.length}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String streetAddress;

    @Pattern(regexp = "^$|^\\d{6}$", message = "{com.itonghui.address.zipCode.regexp}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String zipCode;

    @NotBlank(message = "{com.itonghui.address.phone.null}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    @Pattern(regexp = "^((\\+86)?(13\\d|14[5-9]|15[0-35-9]|166|17[0-8]|18\\d|19[8-9])\\d{8})$", message = "{com.itonghui.address.phone.regexp}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String phone;

    @Pattern(regexp = "^$|^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", message = "{com.itonghui.address.fixphone.regexp}", groups = {BaseGroup.Insert.class, BaseGroup.Update.class})
    private String tel;

    private String isDefault;

    private Date addDate;

    private Date operTime;

    private Long operUser;

    private Integer removeTag;

    private String status;

    private String remark;

    private Long custId;

    private String custName;

    private Long supplyCustId;

    private String supplyCustName;

    private String sysId;

    private String labelName;

    private Long labelId;

    private String longitude;

    private String latitude;

    private String addressClipboard;

    private String areAllName;

    private Long addUser;

    private Long auditUser;

    private Date auditTime;

    private List<Long> listId;
}
